package com.txr.news.pojo.entity;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
public class Article {
    private Integer id;

    private String title;

    private String coverImg;

    private String pubDate;

    private String state;

    private Boolean isDelete;

    private Integer cateId;

    private Integer authorId;

    private String content;

    /*private ArticleCate articleCate;*/
    private String cateName;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getCoverImg() {
        return coverImg;
    }

    public void setCoverImg(String coverImg) {
        this.coverImg = coverImg == null ? null : coverImg.trim();
    }

    public String getPubDate() {
        return pubDate;
    }

    public void setPubDate(String pubDate) {
        this.pubDate = pubDate == null ? null : pubDate.trim();
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state == null ? null : state.trim();
    }

    public Boolean getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Boolean isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getCateId() {
        return cateId;
    }

    public void setCateId(Integer cateId) {
        this.cateId = cateId;
    }

    public Integer getAuthorId() {
        return authorId;
    }

    public void setAuthorId(Integer authorId) {
        this.authorId = authorId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    /*public ArticleCate getArticleCate() {
        return articleCate;
    }

    public void setArticleCate(ArticleCate articleCate) {
        this.articleCate = articleCate;
    }*/

    public Article(Integer id, String title, String coverImg, String pubDate, String state, Boolean isDelete, Integer cateId, Integer authorId, String content) {
        this.id = id;
        this.title = title;
        this.coverImg = coverImg;
        this.pubDate = pubDate;
        this.state = state;
        this.isDelete = isDelete;
        this.cateId = cateId;
        this.authorId = authorId;
        this.content = content;
    }

/*    @Override
    public String toString() {
        return "Article{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", coverImg='" + coverImg + '\'' +
                ", pubDate='" + pubDate + '\'' +
                ", state='" + state + '\'' +
                ", isDelete=" + isDelete +
                ", cateId=" + cateId +
                ", authorId=" + authorId +
                ", content='" + content + '\'' +
                ", articleCate=" + articleCate +
                '}';
    }*/

    public String getCateName() {
        return cateName;
    }

    public void setCateName(String cateName) {
        this.cateName = cateName;
    }

    @Override
    public String toString() {
        return "Article{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", coverImg='" + coverImg + '\'' +
                ", pubDate='" + pubDate + '\'' +
                ", state='" + state + '\'' +
                ", isDelete=" + isDelete +
                ", cateId=" + cateId +
                ", authorId=" + authorId +
                ", content='" + content + '\'' +
                ", cateName='" + cateName + '\'' +
                '}';
    }
}